package com.smile.frame.springbootsatoken.config;


/**
 * @author LGC
 */
public class TokenContext {
    private static final ThreadLocal<String> TOKEN_CONTEXT = new ThreadLocal<>();

    public static void setCurrentToken(String token) {
        TOKEN_CONTEXT.set(token);
    }

    public static String getCurrentToken() {
        return TOKEN_CONTEXT.get();
    }

    public static void clear() {
        TOKEN_CONTEXT.set(null);
    }
}
